Skip to content

feat: [OPE-1840] enable transaction history on Base - #2082

Merged
atepem merged 6 commits into
stagingfrom
precious/enable-base-transaction-history
Jul 23, 2026
Merged

feat: [OPE-1840] enable transaction history on Base#2082
atepem merged 6 commits into
stagingfrom
precious/enable-base-transaction-history

Conversation

@atepem

@atepem atepem commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables transaction history on Base — both Pearl Wallet → History and Agent Wallet → Balances & Assets.

Two parts:

  1. Subgraph URL for Base plugged into TRANSACTION_HISTORY_SUBGRAPH_URLS_BY_EVM_CHAIN (was undefined, surfacing the 'not available on this network yet' state).
  2. v0.0.7 schema support. Base's proxy pins pearl-transactions subgraph v0.0.7, whose schema breaks the queries Pearl sends (Gnosis/Optimism pin v0.0.6): FundsMovement.bondType removed, bond rows moved to a separate bondMovements ledger, OLAS sweeps pre-split into AGENT_OLAS_TO_MASTER, and Service.id reshaped to registry bytes (numeric id now in serviceId). Every request failed GraphQL validation → the tester's 'Error loading transaction history'. This PR adds a per-chain schema-revision map (Base → v2, absent → v1), v2 query documents + Zod schemas verified against the live Base deployment, and service-boundary normalization back to the v1-shaped domain types. Hooks and components are untouched and revision-agnostic; migrating Gnosis/Optimism to v0.0.7 later is a one-line map flip.

Also bumps next 15.5.18 → 15.5.21 in both trees (three new high advisories tripped the yarn audit CI gate).

Screenshots

Agent wallet

Screenshot 2026-07-23 180532

Pearl wallet

Screenshot 2026-07-23 180544

Verification

  • v2 contract taken from live Base endpoint introspection + sample rows, not the subgraph README.
  • New tests: v2 normalizers (utils), v2 service paths for both services (query document selection, normalization, wrong-revision rejection). 27 suites / 389 tests green; typecheck + lint clean.
  • serviceId trap covered: v2 factories deliberately mismatch registry-bytes id vs numeric serviceId so any code reading .id fails tests.

Out-of-scope follow-ups

  • config/chains.ts imports parseEther from the @/utils barrel, creating a latent import cycle (services here deep-import @/utils/transactionHistory to avoid it). Worth switching that import to a deep path.
  • Ops: Gnosis/Optimism proxy pins must stay on subgraph v0.0.6 until their map entries here flip to v2 — Base demonstrated indexers drop old versions.

🤖 Generated with Claude Code

@atepem
atepem requested a review from Tanya-atatakai as a code owner July 23, 2026 12:53
@atepem
atepem changed the base branch from main to staging July 23, 2026 12:53
@atepem
atepem requested a review from OjusWiZard as a code owner July 23, 2026 12:53
Plug in the deployed pearl-transactions subgraph URL for Base
(https://transactions-base.subgraph.autonolas.tech/), replacing the
undefined placeholder that surfaced the 'not available on this network
yet' state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@atepem
atepem force-pushed the precious/enable-base-transaction-history branch from e40f517 to c286e51 Compare July 23, 2026 12:57
atepem and others added 2 commits July 23, 2026 14:03
Clears three new high advisories against next <15.5.21:
GHSA-m99w-x7hq-7vfj (DoS in App Router Server Actions),
GHSA-89xv-2m56-2m9x (SSRF in Server Actions on custom servers),
GHSA-p9j2-gv94-2wf4 (SSRF in rewrites).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@atepem atepem changed the title feat(history): enable transaction history on Base feat: [OPE-1840] enable transaction history on Base Jul 23, 2026
atepem and others added 3 commits July 23, 2026 16:49
Base's transactions proxy pins subgraph v0.0.7, whose schema is
incompatible with the queries Pearl sends (FundsMovement.bondType
removed, bond rows moved to a separate bondMovements ledger, OLAS
sweeps pre-split into AGENT_OLAS_TO_MASTER, Service.id reshaped to
registry bytes with the numeric id in serviceId) — every request
failed GraphQL validation, so Base users saw the error state.

Adds a per-chain schema-revision map beside the subgraph URL map
(Base → v2; absent → v1), v2 query documents + Zod schemas verified
against the live Base deployment, and service-boundary normalization
back to the v1-shaped domain types (bond rows merged into
fundsMovements, sweep rows dropped, service.id mapped from serviceId).
Hooks and components are untouched and revision-agnostic; migrating
Gnosis/Optimism to v0.0.7 later is a one-line map flip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… gate)

Clears GHSA-6g55-p6wh-862q (arbitrary file read via attacker-controlled
sourceMappingURL), high, reachable via next>postcss.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
// v0.0.6 (v1); Base pins v0.0.7 (v2) — its indexers no longer serve v0.0.6.
// When a chain's proxy migrates to v0.0.7, flip its entry here; absent
// entries default to v1.
export const TRANSACTION_HISTORY_SUBGRAPH_SCHEMA_BY_EVM_CHAIN: Partial<

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather extend TRANSACTION_HISTORY_SUBGRAPH_URLS_BY_EVM_CHAIN and rename, e.g. ```
TRANSACTION_HISTORY_SUBGRAPH_BY_EVM_CHAIN = {[EvmChainIdMap.Base]: {url: '...', version: 'v2'}}

[EvmChainIdMap.Base]: 'v2',
};

export const getTransactionHistorySchemaRevision = (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just use object to know?

@atepem
atepem merged commit 989034f into staging Jul 23, 2026
17 checks passed
@atepem
atepem deleted the precious/enable-base-transaction-history branch July 23, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants